/// data : {"admin":false,"coinCount":0,"collectIds":[1165],"email":"","icon":"","id":74352,"nickname":"zhang410726","password":"","publicName":"zhang410726","token":"","type":0,"username":"zhang410726"}
/// errorCode : 0
/// errorMsg : ""

class UserModel {
  Data? data;
  int? errorCode;
  String? errorMsg;

  UserModel(this.data, this.errorCode, this.errorMsg);

  UserModel.fromJson(dynamic json) {
    data = Data.fromJson(json["data"]);
    errorCode = json["errorCode"];
    errorMsg = json["errorMsg"];
  }
}

/// admin : false
/// coinCount : 0
/// collectIds : [1165]
/// email : ""
/// icon : ""
/// id : 74352
/// nickname : "zhang410726"
/// password : ""
/// publicName : "zhang410726"
/// token : ""
/// type : 0
/// username : "zhang410726"

class Data {
  bool? admin;
  int? coinCount;
  List<int>? collectIds;
  String? email;
  String? icon;
  int? id;
  String? nickname;
  String? password;
  String? publicName;
  String? token;
  int? type;
  String? username;

  Data(
      this.admin,
      this.coinCount,
      this.collectIds,
      this.email,
      this.icon,
      this.id,
      this.nickname,
      this.password,
      this.publicName,
      this.token,
      this.type,
      this.username);

  Data.fromJson(dynamic json) {
    admin = json["admin"];
    coinCount = json["coinCount"];
    collectIds =
        json["collectIds"] != null ? json["collectIds"].cast<int>() : [];
    email = json["email"];
    icon = json["icon"];
    id = json["id"];
    nickname = json["nickname"];
    password = json["password"];
    publicName = json["publicName"];
    token = json["token"];
    type = json["type"];
    username = json["username"];
  }
}
